<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>

		<script src="https://lib.sinaapp.com/js/jquery/2.0.2/jquery-2.0.2.min.js">
		</script>


	</head>
	<body>

		<div style="display: none;"></div>
		<div id="app">

		</div>
		<div onclik=>

		</div>
		<!-- 	<script type="text/javascript">
new Vue({
		  el: '#app',
		  data () {
		    return {
		      info: null
		    }
		  },
		  mounted () {
			  this.$axios
		    axios.get('http://localhost:8080/cart',{
    params: {
      "cartGoodsId" :1,
	  "cartGoodsTitle" :"asdsa"
    },
	
  })
		      .then(response => (this.info = response))
		      .catch(function (error) { // 请求失败处理
		        console.log(error);
		      });
			  
		  }
		})
	
	</script> -->

		<input id="a" type="button" οnclick="reuqestJson()" value="请求的是json，输出的是json" />
		<script>
			var pa = {
					"cartGoodsId" :12 ,
					"cartUid" :23,
					"cartNum":54,
				"cartGoodsTitle" :"aswqeqw"
			}
			var pp = JSON.stringify(pa)
			console.log(pp)
			$("#a").click(function() {
				$.ajax({
					type: 'post',
					url: 'http://localhost:8080/cart',
					contentType: 'application/json;charset=utf-8',
					
					data: pp,

					success: function(data) { //返回json结果
					console.log("aaaaa")
						console.log(data)
					}
				});






			})
		</script>
	</body>
</html>
